package org.kongqian.car.domain;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.kongqian.basic.domain.BaseDomain;
import org.kongqian.org.domain.Employee;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * <p>
 * 
 * </p>
 *
 * @author kq
 * @since 2022-11-03
 */
public class Car extends BaseDomain{

    private static final long serialVersionUID = 1L;

    private Long id;
    private String title;
    /**
     * 封面 fastdfs地址
     */
    private String cover;
    /**
     * 原价
     */
    private BigDecimal saleprice;
    /**
     * 售价
     */
    private BigDecimal costprice;
    private Integer isnew;
    /**
     * 上牌时间
     */
    private Date reigstertime;
    /**
     * 里程
     */
    private Double mileage;
    /**
     * 店铺Id 如果被领养店铺id为null
     */
    private Long shopId;
    private String shopname;
    private Date createtime;
    //发售时间
    private Date onsaletime;
    //停售时间
    private Date offsaletime;
    /**
     * 状态：0下架 1上架
     */
    private Integer state;
    /**
     * 是否超值
     */
    private Integer costeffective;
    /**
     * 急售
     */
    private Integer rushsale;
    /**
     * 准新车
     */
    private Integer quasinewcar;
    private Integer transitivecountry;
    /**
     * 类型id
     */
    private Long typeId;

    private CarType type;

    private Long sellerId;

    private Employee seller;
    /**
     * 如果被领养为领养用户id
     */
    private Long userId;
    /**
     * 寻主消息id
     */
    private Long searchMasterMsgId;
    /**
     * 审核状态
     */
    private Integer auditstate;

    private List<Car> children;

    private CarDetail carDetail;


    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getCover() {
        return cover;
    }

    public void setCover(String cover) {
        this.cover = cover;
    }

    public BigDecimal getSaleprice() {
        return saleprice;
    }

    public void setSaleprice(BigDecimal saleprice) {
        this.saleprice = saleprice;
    }

    public BigDecimal getCostprice() {
        return costprice;
    }

    public void setCostprice(BigDecimal costprice) {
        this.costprice = costprice;
    }

    public Integer getIsnew() {
        return isnew;
    }

    public void setIsnew(Integer isnew) {
        this.isnew = isnew;
    }


    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    public Date getReigstertime() {
        return reigstertime;
    }

    @DateTimeFormat(pattern = "yyyy-MM-dd")
    public void setReigstertime(Date reigstertime) {
        this.reigstertime = reigstertime;
    }

    public Double getMileage() {
        return mileage;
    }

    public void setMileage(Double mileage) {
        this.mileage = mileage;
    }

    public Long getShopId() {
        return shopId;
    }

    public void setShopId(Long shopId) {
        this.shopId = shopId;
    }

    public String getShopname() {
        return shopname;
    }

    public void setShopname(String shopname) {
        this.shopname = shopname;
    }


    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    public Date getCreatetime() {
        return createtime;
    }

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    public void setCreatetime(Date createtime) {
        this.createtime = createtime;
    }

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    public Date getOnsaletime() {
        return onsaletime;
    }

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    public void setOnsaletime(Date onsaletime) {
        this.onsaletime = onsaletime;
    }

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    public Date getOffsaletime() {
        return offsaletime;
    }

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    public void setOffsaletime(Date offsaletime) {
        this.offsaletime = offsaletime;
    }

    public Integer getState() {
        return state;
    }

    public void setState(Integer state) {
        this.state = state;
    }

    public Integer getCosteffective() {
        return costeffective;
    }

    public void setCosteffective(Integer costeffective) {
        this.costeffective = costeffective;
    }

    public Integer getRushsale() {
        return rushsale;
    }

    public void setRushsale(Integer rushsale) {
        this.rushsale = rushsale;
    }

    public Integer getQuasinewcar() {
        return quasinewcar;
    }

    public void setQuasinewcar(Integer quasinewcar) {
        this.quasinewcar = quasinewcar;
    }

    public Integer getTransitivecountry() {
        return transitivecountry;
    }

    public void setTransitivecountry(Integer transitivecountry) {
        this.transitivecountry = transitivecountry;
    }

    public Long getTypeId() {
        return typeId;
    }

    public void setTypeId(Long typeId) {
        this.typeId = typeId;
    }

    public Long getSellerId() {
        return sellerId;
    }

    public void setSellerId(Long sellerId) {
        this.sellerId = sellerId;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public Long getSearchMasterMsgId() {
        return searchMasterMsgId;
    }

    public void setSearchMasterMsgId(Long searchMasterMsgId) {
        this.searchMasterMsgId = searchMasterMsgId;
    }

    public Integer getAuditstate() {
        return auditstate;
    }

    public void setAuditstate(Integer auditstate) {
        this.auditstate = auditstate;
    }

    public List<Car> getChildren() {
        return children;
    }

    public void setChildren(List<Car> children) {
        this.children = children;
    }

    public CarType getType() {
        return type;
    }

    public void setType(CarType type) {
        this.type = type;
    }

    public Employee getSeller() {
        return seller;
    }

    public void setSeller(Employee seller) {
        this.seller = seller;
    }

    public CarDetail getCarDetail() {
        return carDetail;
    }

    public void setCarDetail(CarDetail carDetail) {
        this.carDetail = carDetail;
    }

    @Override
    public String toString() {
        return "Car{" +
        ", id=" + id +
        ", title=" + title +
        ", cover=" + cover +
        ", saleprice=" + saleprice +
        ", costprice=" + costprice +
        ", isnew=" + isnew +
        ", reigstertime=" + reigstertime +
        ", mileage=" + mileage +
        ", shopId=" + shopId +
        ", shopname=" + shopname +
        ", createtime=" + createtime +
        ", onsaletime=" + onsaletime +
        ", offsaletime=" + offsaletime +
        ", state=" + state +
        ", costeffective=" + costeffective +
        ", rushsale=" + rushsale +
        ", quasinewcar=" + quasinewcar +
        ", transitivecountry=" + transitivecountry +
        ", typeId=" + typeId +
        ", sellerId=" + sellerId +
        ", userId=" + userId +
        ", searchMasterMsgId=" + searchMasterMsgId +
        ", auditstate=" + auditstate +
        "}";
    }
}
